﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.SessionState;

namespace Manage.Tools
{
    /// <summary>
    /// DoAction 的摘要说明
    /// </summary>
    public class DoAction : IHttpHandler, IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string act = context.Request["act"].ToString();
            if (act == "login")
            {
                if (!context.Request["c"].ToUpper().Equals(context.Session["VerifyCode"].ToString()))
                {
                    context.Response.Write("1");
                }
                else if (act == "44")
                {
                    context.Response.Write("2");
                }
                else
                {
                    context.Response.Write("0");
                }
                context.Response.End();
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}